<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>内部申购</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=yes" name="format-detection" />
    <link href="<%=basepath%>css/index.css" rel="stylesheet" type="text/css">
    <link href="<%=basepath%>css/requisitions.css" rel="stylesheet" type="text/css">
    <script src="<%=basepath%>js/jquery-1.8.3.min.js"></script>
    <script src="<%=basepath%>js/layer/layer.js"></script>
</head>
<body>
<div class="viewport">
    <%@ include file='purchasing-header.html'%>
    <div class="content m-top">
        <div class="content-2">
            <div class="content-2-1">
                <ul>
                    <li class="li-active"><a href="/wape-web/api/core/centerService?serviceCode=3002P02">内部申购</a> </li>
                    <li><a href="/wape-web/api/core/centerService?serviceCode=3004P03">渠道询价</a> </li>
                    <li><a href="/wape-web/api/core/centerService?serviceCode=3005P04">报价审核</a> </li>
                </ul>
            </div>
        </div>
        <c:forEach var="item" items="${purchaseHeaders}">

            <div class="content-3">
                <a href="/wape-web/api/core/centerService?serviceCode=3002P03&frontId=${item.frontId}&goodsKingdom=${item.goodsKingdom}&sendUserId=${item.sendUserId}&sendUserName=${item.sendUserName}&sendTime=${item.sendTime}&entriesNum=${item.entriesNum}&introduction=${item.introduction}&purchaseState=${item.purchaseState}&sendDepartName=${item.sendDepartName}&validity=${item.validity}&receiptAddress=${item.receiptAddress}">
                    <div class="content-3-1">
                        <div class="content-3-2">
                            <span class="span-1">单号：</span><span class="span-1-2">${item.purchaseId}</span><span class="span-3" id="time">${item.sendTime}</span>
                        </div>
                    </div>
                    <div class="content-3-1">
                        <div class="content-3-2">
                            <span class="span-1-1">${item.goodsKingdom}：${item.introduction}</span><span class="span-3">${item.entriesNum}项</span>
                        </div>
                    </div>
                    <div class="content-3-1">
                        <div class="content-3-2">
                            <span class="span-4">申购人：${item.sendUserName}</span><span class="span-3">卖家送货</span>
                        </div>
                    </div>
                </a>
                <div class="content-3-1">
                    <div class="content-3-2">
                        <span class="span-4 opacity">${item.validity == '0' ? '未核准' : '已核准'}</span><span class="span-3"><a href="javascript:void(0)" class="a-4 silver opacity" id="shan">删除单据</a><a href="javascript:void(0)" class="a-4" id="shouhuo">收货信息</a><a href="javascript:void(0)" class="a-5" id="qudao">渠道询价</a> </span>
                    </div>
                </div>
            </div>
            <div class="blank"></div>
        </c:forEach>


    </div>
</div>
</body>
</html>
<script type="text/javascript">
    /*下滑拉数据 */
    var ah=0,bh=0,ch=0;
    window.onscroll=function(){
        ah = $(window).height();
        bh = $(document).scrollTop();
        ch = document.documentElement.scrollTop==0? document.body.scrollHeight : document.documentElement.scrollHeight;
        if(ah+bh>=ch){

        }
    };
</script>